/**
 * 版权所有(C)，中国银联股份有限公司，2002-2013，所有权利保留。
 * 
 * 项目名：	simple-service
 * 文件名：	FunctionInfoServiceImpl.java
 * 模块说明：	
 * 修改历史：
 * 2013-10-29 - Administrator - 创建。
 */
package com.aeky.simple.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aeky.simple.dao.FunctionInfoDao;
import com.aeky.simple.entity.FunctionInfo;
import com.aeky.simple.service.FunctionInfoService;
import com.aeky.simple.vo.page.Pager;

/**
 * @author wanghui
 * 
 */
@Service("functionInfoService")
public class FunctionInfoServiceImpl implements FunctionInfoService {

    @Autowired
    private FunctionInfoDao functionInfoDao;

    public List<FunctionInfo> queryAll() {
        return functionInfoDao.queryAll();
    }

    public Pager<FunctionInfo> queryFunctionInfoList(Pager<FunctionInfo> pager,
                    Map<String, Object> paramMap) {
        return functionInfoDao.queryFunctionInfoList(pager, paramMap);
    }

    public List<FunctionInfo> queryFuncInfoComboxValue(String sysCode, String funcType) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("sysCode", sysCode);
        paramMap.put("funcType", funcType);
        return functionInfoDao.queryFuncInfoComboxValue(paramMap);
    }

    public void addFunctionInfo(FunctionInfo funcInfo) {
        functionInfoDao.addFunctionInfo(funcInfo);
    }

    public FunctionInfo queryFunctionInfoByPKAndVersion(String sysCode, String funcCode,
                    Integer version) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("sysCode", sysCode);
        paramMap.put("funcCode", funcCode);
        paramMap.put("version", version);
        return functionInfoDao.queryFunctionInfoByPKAndVersion(paramMap);
    }

    public void updateFunctionInfo(FunctionInfo functionInfo) {
        functionInfoDao.updateFunctionInfo(functionInfo);
    }

    public void deleteFunctionInfo(String sysCode, String funcCode, Integer version) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("sysCode", sysCode);
        paramMap.put("funcCode", funcCode);
        paramMap.put("version", version);
        functionInfoDao.deleteFunctionInfo(paramMap);
    }

}
